#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
using webapp4U.DAL;
#endregion


namespace webapp4U.BOL
{
	 public class Raovat : BizObject
	 {
	     #region Member Variables

	     private Int32 _raovatID;

	     private String _userID;

	     private Int32 _cateID;

	     private Int32 _locationID;

	     private String _title;

	     private String _description;

	     private String _fullName;

	     private String _address;

	     private String _email;

	     private String _phone;

	     private String _mobile;

	     private String _fax;

	     private DateTime _addedDate;

	     private String _addedBy;

	     private Int32 _displayOrder;

         private Int32 _totalViews;

	     private Boolean _isActive;
       

	     #endregion


	     #region Public Properties

	     public Int32 RaovatID
	     {
		     get { return _raovatID; }
		     set { _raovatID = value; }
	     }

	     public String UserID
	     {
		     get { return _userID; }
		     set { _userID = value; }
	     }

	     public Int32 CateID
	     {
		     get { return _cateID; }
		     set { _cateID = value; }
	     }

	     public Int32 LocationID
	     {
		     get { return _locationID; }
		     set { _locationID = value; }
	     }

	     public String Title
	     {
		     get { return _title; }
		     set { _title = value; }
	     }

	     public String Description
	     {
		     get { return _description; }
		     set { _description = value; }
	     }

	     public String FullName
	     {
		     get { return _fullName; }
		     set { _fullName = value; }
	     }

	     public String Address
	     {
		     get { return _address; }
		     set { _address = value; }
	     }

	     public String Email
	     {
		     get { return _email; }
		     set { _email = value; }
	     }

	     public String Phone
	     {
		     get { return _phone; }
		     set { _phone = value; }
	     }

	     public String Mobile
	     {
		     get { return _mobile; }
		     set { _mobile = value; }
	     }

	     public String Fax
	     {
		     get { return _fax; }
		     set { _fax = value; }
	     }

	     public DateTime AddedDate
	     {
		     get { return _addedDate; }
		     set { _addedDate = value; }
	     }

	     public String AddedBy
	     {
		     get { return _addedBy; }
		     set { _addedBy = value; }
	     }

	     public Int32 DisplayOrder
	     {
		     get { return _displayOrder; }
		     set { _displayOrder = value; }
	     }

         public int TotalViews
         {
             get { return _totalViews; }
             set { _totalViews = value; }
         }

	     public Boolean IsActive
	     {
		     get { return _isActive; }
		     set { _isActive = value; }
	     }

	     #endregion

	     #region public static Methods

         public static Boolean UpdateVisitor(Int32 RaovatID)
         {
             RaovatDAL db = new RaovatDAL();
             return db.UpdateVisitor(RaovatID);
         }


         public static List<Raovat> GetRaovatDakiemduyet()
         {
             RaovatDAL db = new RaovatDAL();
             return db.GetRaovatDakiemduyet();
         }

         public static List<Raovat> Search(int CateID, int LocationID, string Keyword)
         {
             RaovatDAL db = new RaovatDAL();
             return db.Search(CateID, LocationID, Keyword);
         }


         public static Boolean Kiemduyet(Int32 RaovatID)
         {
             RaovatDAL db = new RaovatDAL();
             return db.Kiemduyet(RaovatID);
         }

	     public static int Insert(Raovat obj)
	     {
		     RaovatDAL db = new RaovatDAL();
		     return db.Insert(obj);
	     }

	     public static bool Update(Raovat obj)
	     {
		     RaovatDAL db = new RaovatDAL();
		     return db.Update(obj);
	     }

	     public static bool Delete(Int32 RaovatID)
	     {
		     RaovatDAL db = new RaovatDAL();
		     return db.Delete(RaovatID); 
	     }

	     public static Raovat GetRaovatByID(Int32 RaovatID)
	     {
		     RaovatDAL db = new RaovatDAL();
		     return db.GetRaovatByID(RaovatID);
	     }


         //Get All Raovat
         public static List<Raovat> GetAllRaovat()
         {
             RaovatDAL db = new RaovatDAL();
             return db.GetAllRaovat(1, MAXROWS);
         }


	     //Get All Raovat
	     public static List<Raovat> GetAllRaovat(int PageIndex, int PageSize)
	     {
		     RaovatDAL db = new RaovatDAL();
		     return db.GetAllRaovat(PageIndex, PageSize);
	     }

	     // Get Count All records of Table  Raovat
	     public static int GetCountRaovat()
	     {
		     RaovatDAL db = new RaovatDAL();
		     return db.GetCountRaovat();
	     }

	     // Get RaovatByCateID
	     public static List<Raovat> GetRaovatByCateID(Int32 CateID,int PageIndex, int PageSize)
	     {
		     RaovatDAL db = new RaovatDAL();
		     return db.GetRaovatByCateID(CateID, PageIndex, PageSize);
	     }
	     // Get RaovatByLocationID
	     public static List<Raovat> GetRaovatByLocationID(Int32 LocationID,int PageIndex, int PageSize)
	     {
		     RaovatDAL db = new RaovatDAL();
		     return db.GetRaovatByLocationID(LocationID, PageIndex, PageSize);
	     }

	     // Get RaovatCountByCateID
	     public static int GetRaovatCountByCateID(Int32 CateID)
	     {
		     RaovatDAL db = new RaovatDAL();
		     return db.GetRaovatCountByCateID(CateID);
	     }
	     // Get RaovatCountByLocationID
	     public static int GetRaovatCountByLocationID(Int32 LocationID)
	     {
		     RaovatDAL db = new RaovatDAL();
		     return db.GetRaovatCountByLocationID(LocationID);
	     }

	     #endregion
	 }
}
